package com.bright.ghj.overt.repository.primary;

import com.bright.ghj.overt.pojo.po.primary.FileItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface FileItemRepository extends JpaRepository<FileItem, Integer>, JpaSpecificationExecutor<FileItem> {

    @Query("from FileItem where fileName=:fileName and isShow=true and fieldLen<>0 order by iSort")
    List<FileItem> findFileItemByFilename(@Param("fileName") String fileName);

}